class SearchItem {
  String highLightKeyword;
  int count;
  String id;
  String time;
  String keyword;

  SearchItem({
    required this.highLightKeyword,
    required this.count,
    required this.id,
    required this.time,
    required this.keyword,
  });

  factory SearchItem.fromJson(Map<String, dynamic> json) {
    return SearchItem(
      highLightKeyword: json['highLightKeyword'],
      count: json['count'],
      id: json['id'],
      time: json['time'],
      keyword: json['keyword'],
    );
  }

  Map<String, dynamic> toJson() {
    return {
      'highLightKeyword': highLightKeyword,
      'count': count,
      'id': id,
      'time': time,
      'keyword': keyword,
    };
  }
}

class SearchItemList {
  List<SearchItem> items;

  SearchItemList({required this.items});

  factory SearchItemList.fromJson(List<dynamic> json) {
    List<SearchItem> items = [];
    items = json.map((item) => SearchItem.fromJson(item)).toList();
    return SearchItemList(items: items);
  }

  List<Map<String, dynamic>> toJson() {
    return items.map((item) => item.toJson()).toList();
  }
}